<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <include file="public:meta"/>
    <link href="../public/css/personal/common.css" rel="stylesheet" type="text/css"/>
    <link href="../public/css/personal/personal_user.css" rel="stylesheet" type="text/css"/>
    <link href="../public/css/personal/personal_ajax_dialog.css" rel="stylesheet" type="text/css"/>
    <script src="../public/js/personal/jquery.common.js" type="text/javascript" language="javascript"></script>
</head>
<body>
<include file="Personal:index_header"/>
<div class="user_main">
    <include file="Personal:index_left_nav"/>
    <div class="mainbox">
        <!--切换卡 -->
        <div class="tab">
            <a class="li J_hoverbut" href="{:U('index')}">我的{:C('qscms_points_byname')}</a>
            <a class="li J_hoverbut " href="{:U('task')}">我的任务</a>
            <a class="li J_hoverbut " href="{:U('increment')}">增值服务</a>
            <a class="li select ">服务订单</a>
            <notempty name="apply['Mall']">
                <a class="li J_hoverbut" href="{:U('order_list_goods')}">商城订单</a>
            </notempty>
            <div class="clear"></div>
        </div>
        <!--切换卡结束 -->

        
            <div class="resume_tip">
                <div class="tiptit">小提示</div>
                <div class="tiptxt link_blue">订单自创建日期起，超过15天没有完成支付，系统将会自动将订单取消</div>
            </div>
            <div class="order_list_th">
                <div class="th1">订单内容</div>
                <div class="th2">
                    支付方式
                </div>
                <div class="th3">
                    <div class="th_select input_140_30_div J_hoverinput J_dropdown J_listitme_parent">
                    <span class="J_listitme_text"><if condition="$Think.get.is_paid eq '2'">已完成<elseif
                            condition="$Think.get.is_paid eq '1'"/>待付款<elseif condition="$Think.get.is_paid eq '3'"/>已取消<else/>订单状态</if></span>
                        <div class="dropdowbox13 J_dropdown_menu">
                            <div class="dropdow_inner13">
                                <ul class="nav_box">
                                    <li><a class="J_listitme" href="{:P(array('is_paid'=>0))}">全部</a></li>
                                    <li><a class="J_listitme" href="{:P(array('is_paid'=>1))}">待付款</a></li>
                                    <li><a class="J_listitme" href="{:P(array('is_paid'=>2))}">已付款</a></li>
                                    <li><a class="J_listitme" href="{:P(array('is_paid'=>'3'))}">已取消</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="th4">金额</div>
                <div class="th5">操作</div>
                <div class="clear"></div>
            </div>
            <notempty name="order['list']">
            <volist name="order['list']" id="vo">
                <div class="order_list">
                    <div class="td1 link_blue">
                        <a href="{:U('order_detail',array('id'=>$vo['id']))}">{$vo['oid']}</a>
                        <br/>
                        <if condition="$vo['order_type'] eq 3">
                            简历置顶
                            <elseif condition="$vo['order_type'] eq 4"/>
                                醒目标签
                            <elseif condition="$vo['order_type'] eq 5"/>
                                简历模板
                        </if>
                        &nbsp;&nbsp;|&nbsp;&nbsp;下单时间：{:date('Y-m-d H:i',$vo['addtime'])}
                    </div>
                    <div class="td2">{$vo['payment_cn']}</div>
                    <if condition="$vo['is_paid'] eq 1">
                        <div class="td3">待付款</div>
                        <elseif condition="$vo['is_paid'] eq 3"/>
                        <div class="td3 ok">已取消</div>
                        <else/>
                        <div class="td3 ok">已付款</div>
                    </if>
                    <if condition="$vo['amount'] gt 0 && $vo['points']">
                        <div class="td4">￥{$vo['amount']} + {$vo['points']}{:C('qscms_points_byname')}</div>
                        <elseif condition="$vo['points']"/>
                        <div class="td4">{$vo['points']}{:C('qscms_points_byname')}</div>
                        <else/>
                        <div class="td4">￥{$vo['amount']}</div>
                    </if>
                    <div class="td5 link_blue">
                        <if condition="$vo['is_paid'] eq '3'">
                            <a href="javascript:;" class="delete" url="{:U('order_delete')}" oid="{$vo['id']}">删除</a>
                            <elseif condition="$vo['is_paid'] eq '1'"/>
                            <a href="{:U('order_detail',array('id'=>$vo['id']))}">支付</a>&nbsp;&nbsp;
                            <a href="javascript:;" class="cancel" url="{:U('order_cancel')}" oid="{$vo['id']}">取消</a>
                            <else/>
                            --
                        </if>
                    </div>
                    <div class="clear"></div>
                </div>
            </volist>
            <div class="qspage">{$order['page']}</div>
            <else/>
            <div class="res_empty">
                您暂时还没有增值服务订单记录
            </div>
            </notempty>
    </div>
    <div class="clear"></div>
</div>
<include file="Personal:index_footer"/>
<script type="text/javascript">
    $(".delete").click(function () {
        var url = $(this).attr('url');
        var id = $(this).attr('oid');
        var qsDialog = $(this).dialog({
            title: '删除订单',
            loading: true,
            border: false,
            yes: function () {
                $.post(url, {id: id}, function (result) {
                    if (result.status == 1) {
                        disapperTooltip('success', result.msg);
                        setTimeout(function () {
                            window.location.reload();
                        }, 2000);
                    } else {
                        disapperTooltip('remind', result.msg);
                    }
                }, 'json');
            }
        });
        $.getJSON(url, {id: id}, function (result) {
            if (result.status == 1) {
                qsDialog.setContent(result.data.html);
            } else {
                disapperTooltip('remind', result.msg);
            }
        });
    });
    $(".cancel").click(function () {
        var url = $(this).attr('url');
        var id = $(this).attr('oid');
        var qsDialog = $(this).dialog({
            title: '取消订单',
            loading: true,
            border: false,
            yes: function () {
                $.post(url, {id: id}, function (result) {
                    if (result.status == 1) {
                        disapperTooltip('success', result.msg);
                        setTimeout(function () {
                            window.location.reload();
                        }, 2000);
                    } else {
                        disapperTooltip('remind', result.msg);
                    }
                }, 'json');
            }
        });
        $.getJSON(url, {id: id}, function (result) {
            if (result.status == 1) {
                qsDialog.setContent(result.data.html);
            } else {
                disapperTooltip('remind', result.msg);
            }
        });
    });
</script>
</body>
</html>